<!DOCTYPE html>
<html th:replace="~{layouts/layout :: layout(~{::title}, ~{::#main_content})}" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>字库</title>
</head>
<body>
<div id="main_content">

<div class="well">		
	<form action="" role="form" method="get" class="form-inline">

	  <div class="form-group">
		<label for="letter">索引</label>
		<select id="letter" name="letter" class="form-control">
			<option value="">全部</option>
			<option th:if="${letters != null}" th:each="letter : ${letters}"
					th:value="${letter}" th:text="${letter}"  th:selected="${letter eq ziku.letter}" ></option>
		</select>
	  </div>
	  
	  <div class="form-group">
		<label for="zi">汉字</label>
		<input type="text" th:value="${ziku.zi}" placeholder="汉字" id="zi" value="" class="form-control" name="zi" />
	  </div>
	  
	  <div class="form-group">
		<label for="py">拼音</label>
		<input type="text"  th:value="${ziku.py}" placeholder="拼音" id="py" value="" class="form-control" name="py" />
	  </div>

	  <div class="form-group">
		<label for="frequency1">常用词</label>
		是<input th:checked="${ziku.frequency!=null && ziku.frequency}" type="radio" placeholder="常用词" id="frequency1" value="1" class="form-control" name="frequency" />
		否<input th:checked="${ziku.frequency!=null && !ziku.frequency}" type="radio" placeholder="常用词" id="frequency0" value="0" class="form-control" name="frequency" />
	  </div>

	  <div class="form-group">
		<label for="type">类型</label>
		<select  id="type" name="type">
			<option value="">全部</option>
			<option th:if="${zikuTypes != null}" th:each="zikuType : ${zikuTypes}"
                    th:value="${zikuType.key}" th:text="${zikuType.value}"  th:selected="${ziku.type eq zikuType.key}" ></option>
		</select>
	  </div>

	  <button class="btn btn-primary" type="submit">查询</button>
	</form>	
</div>


<div th:replace="~{layouts/page :: page}" class="u-page"  style="margin-bottom:30px;"></div>

<div class="pdt10">
	 
<table class="table table-hover u-table">
  	<thead>
	<tr>
		<th width="5%">ID</th>
		<th width="5%">首字母</th>
		<th width="15%">字</th>
		<th width="15%">拼音</th>
		<th width="15%">拼音</th>
		<th width="5%">百度</th>
	</tr>
  	</thead>

<tbody>

<tr th:each="ziku : ${zikuLst}">
    <td th:text="${ziku.id}"></td>
	<td th:text="${ziku.letter}"></td>
	<td th:text="${ziku.zi}"></td>
	<td th:text="${ziku.py}"></td>
	<td th:text="${ziku.pinyin}"></td>

	<td>
		<a href="https://www.baidu.com/s?wd=" target="_blank">查看</a>
	</td>

</tr>
</tbody>
	
</table>
</div>

<div th:replace="~{layouts/page :: page}" class="u-page"  style="margin-bottom:30px;"></div>

</div>
</body>
</html>